package com.gjintel.framework.log.util;

import java.util.Date;

import com.gjintel.framework.log.model.LogInfo;
import com.gjintel.framework.log.service.ILogInfoService;
import com.gjintel.sdk.util.SpringContextUtil;

public class LogUtil {
	public enum LogType {
		ADD, UPDATE, DELETE, SHELVE
	}

	public static void addLog(LogInfo log) {
		if (log != null) {
			log.setOpTime(new Date());
			ILogInfoService logInfoService = (ILogInfoService) SpringContextUtil.getBean("logInfoService");
			logInfoService.saveOrUpdate(log);
		}
	}

}
